package August;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Day0828 {
    //求和
    static ArrayList<ArrayList<Integer>> res = new ArrayList<>();
    static ArrayList<Integer> list = new ArrayList<>();
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            int n = scanner.nextInt();
            int m = scanner.nextInt();

            dfs(1,m,n);

            for (ArrayList<Integer> i:res) {
                int j = 0;
                for (; j < i.size()-1; j++) {
                    System.out.print(i.get(j)+" ");
                }
                System.out.println(i.get(j));
            }
        }
    }

    private static void dfs(int i, int m, int n) {
        if (m == 0){
            res.add(new ArrayList<>(list));
        }else {
            for (int j = i; j <= m && j<= n ; j++) {
                list.add(j);
                dfs(j+1,m-j,n);
                list.remove(list.size()-1);
            }
        }
    }


    //电话号码
}
